package com.kelp.codetoolkit.enums

import kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf.QualifiedNameTable.QualifiedName

/**
 * @author: liuyuebai
 * @date: 2024/11/27 07:31
 * @description:
 */
enum class JavaCollectionEnum(val collectionName: String,val qualifiedName:String) {
    LIST("List","java.util.List"),
    MAP("Map","java.util.Map"),
    SET("Set","java.util.Set"),
    COLLECTION("Collection","java.util.Collection"),
    ;
    companion object {
        fun getByName(name: String): JavaCollectionEnum? {
            values().forEach {
                if (it.collectionName == name) {
                    return it
                }
            }
            return null
        }

        fun isMap(collectionName: String): Boolean {
            return MAP.collectionName == collectionName
        }
    }

}